package com.york.auth.api;

import com.york.auth.entity.AuthUserDTO;
import com.york.auth.entity.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

/**
 * @author York
 * @className UserFeignService
 * @date 2024/8/9
 * @description 微服务调用
 * 所有可以对外暴露的接口都写在api层
 * 然后该微服务想要调用另一个微服务就在infra层的rpc下去调用
 * 当然需要引入
 */
@FeignClient("jc-club-auth-dev")
public interface UserFeignService {

    @RequestMapping("/user/getUserInfo")
    Result<AuthUserDTO> getUserInfo(@RequestBody AuthUserDTO authUserDTO);

    @RequestMapping("/user/listByIds")
    Result<List<AuthUserDTO>> listUserInfoByIds(@RequestBody List<String> userNameList);

}
